import 'package:hi_common/hi_common.dart';
import 'package:flutter/material.dart';

const BoxShadow DEFAULT_SHADOW = BoxShadow(
  color: const Color.fromRGBO(153, 153, 153, 0.2),
  blurRadius: 6,
  spreadRadius: 1,
);

class ShadowRadiusCard extends StatelessWidget {
  final Widget child;
  final double height;
  final double width;
  final EdgeInsets margin;
  final EdgeInsets padding;
  final Alignment alignment;

  const ShadowRadiusCard({
    Key key,
    this.child,
    this.width,
    this.height,
    this.margin,
    this.padding,
    this.alignment,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: margin,
      padding: padding,
      height: height,
      width: width,
      alignment: alignment,
      decoration: BoxDecoration(
        color: Colors.white,
        borderRadius: BorderRadius.circular(
          10.w,
        ),
        boxShadow: [DEFAULT_SHADOW],
      ),
      child: child,
    );
  }
}
